package net.cyl.strategy;

import java.util.Arrays;
import java.util.List;
import java.util.Random;

public class ShardingTableConfig {

    private static final List<String> tableSuffixList = Arrays.asList("0", "1", "a");

    private static final Random random = new Random();

    public static String getRandomTablePrefix(String code) {
        int hashcode=Math.abs(code.hashCode());
        int index = hashcode % tableSuffixList.size();
        return tableSuffixList.get(index);
    }
}
